import React from 'react';
import { useContext } from 'react';
import { useState } from 'react';
import B from './B'

export let context = React.createContext();

function A(props) {
    let [count, setCount] = useState(100)
    return (
        <context.Provider value={count}>
            <div>
                {`我是组件A：${count}`}
                <B></B>
            </div>
        </context.Provider>
    );
}

export default A;